/** @type {import("jest").Config} **/
module.exports = {
  preset: "ts-jest/presets/default-esm",
  testEnvironment: "node",
  extensionsToTreatAsEsm: [".ts"],
  transform: {
    "^.+\.ts$": ["ts-jest", {
      useESM: true,
      tsconfig: {
        module: "es2020",
        target: "ES2020"
      }
    }]
  },
  moduleNameMapper: {
    "^(\.{1,2}/.*)\.js$": "$1",
    "^@/(.*)$": "<rootDir>/src/$1"
  },
  clearMocks: true,
  resetMocks: true,
  restoreMocks: true
};